function init(title, icon, message) {
  document.body.innerHTML = '<div class="msg"><div class="icon nolink"><img src="' + icon + '"/></div><h4 class="nolink">' + title + '</h4>' + message + '<div class="nolink" style="clear:both"></div></div>';
}

function goTo(el, page, oid) {
  var row = el;
  slideUp(row, 200);
  if (hasClass(row, 'first')) {
    addClass(row.nextSibling, 'first');
  }
  var allHidden = true;
  var nodes = row.parentNode.childNodes;
  for (var i = 0; i < nodes.length; i++) {
    var item = nodes[i];
    if (hasClass(item, 'nolink')) continue;
    if (item != row && item && item.style && isVisible(item)) {
      allHidden = false;
      console.log(i, item);
      break;
    }
  }
  var req = {action: 'goto', page: page, oid: oid};
  if (allHidden) {
    req.hide = window.id;
  }
  chrome.extension.sendRequest([req]);
}
